const serviceOrgModel = (request) => {
	return {
		sysServiceOrganization_page(query = {}) {
			return request('/admin/sysServiceOrganization/page', {
				method: 'post',
				data: query,
			})
		},
		sysServiceOrganization_add(query = {}) {
			return request('/admin/sysServiceOrganization/add', {
				method: 'post',
				data: query,
			})
		},
		sysServiceOrganization_edit(query = {}) {
			return request('/admin/sysServiceOrganization/edit', {
				method: 'post',
				data: query,
			})
		},
		sysServiceOrganization_del(query = {}) {
			return request('/admin/sysServiceOrganization/del', {
				method: 'post',
				data: query,
			})
		},
	}
}
const baseModel = (request) => {
	return {
		// 同步变更同步
		view_dpDataChange_change(query) {
			return request('/bussiness/dpDataChange/change', {
				method: 'post',
				data: query,
			})
		},
		// 查询变更批次
		view_dpDataChange_getDataChangeId(number) {
			return request(`/bussiness/dpDataChange/getDataChangeId/${number}`, {
				method: 'get',
			})
		},
		// 根据表名查询字段
		view_metadata_fields(query) {
			return request('/bussiness/metadata/getFields', {
				method: 'post',
				data: query,
			})
		},
		// 采集详情
		view_dpAppealDetails_page(query) {
			return request('/bussiness/dpAppealDetails/page', {
				method: 'post',
				data: query,
			})
		},
		// 通过批次号查询数据明细任务单
		view_dpGatherForm_allCount(query) {
			return request('/bussiness/dpGatherForm/getAllCount', {
				method: 'post',
				data: query,
			})
		},
		// 通过批次号查询数据明细任务单
		view_dpGatherForm_form(query) {
			return request('/bussiness/dpGatherForm/getFormByBatchNum', {
				method: 'post',
				data: query,
			})
		},
		// 数据采集任务列表
		view_dpGatherForm_page(query) {
			return request('/bussiness/dpGatherForm/page', {
				method: 'post',
				data: query,
			})
		},
		// 数据采集任务-删除
		view_dpGatherForm_del(query) {
			return request('/bussiness/dpGatherForm/del', {
				method: 'post',
				data: {
					batchesDel: query,
				},
			})
		},
		// 数据采集任务列表= 导出
		view_dpGatherForm_export(query) {
			return request('/bussiness/dpGatherForm/export', {
				method: 'post',
				data: query,
			})
		},
		// 分页查询数据明细
		view_dpDetails_page(query) {
			return request('/bussiness/dpDetails/page', {
				method: 'post',
				data: query,
			})
		},
		// 分页查询数据明细 导出
		view_dpDetails_export(query) {
			return request('/bussiness/dpDetails/export', {
				method: 'post',
				data: query,
			})
		},
	}
}
// 数据比对异常申诉
const dpExceptionAppealModel = (request) => {
	return {
		// 数据比对异常申诉
		view_dpExceptionAppeal_page(query) {
			return request('/bussiness/dpExceptionAppeal/page', {
				method: 'post',
				data: query,
			})
		},
		// 数据比对异常申诉 - 导出
		view_dpExceptionAppeal_export(query) {
			return request('/bussiness/dpExceptionAppeal/export', {
				method: 'post',
				data: query,
			})
		},
		view_dpExceptionAppeal_add(query) {
			return request('/bussiness/dpExceptionAppeal/add', {
				method: 'post',
				data: query,
			})
		},
		view_dpExceptionAppeal_edit(query) {
			return request('/bussiness/dpExceptionAppeal/edit', {
				method: 'post',
				data: query,
			})
		},
		// 发起申诉
		view_dpExceptionAppeal_appeal(query) {
			return request('/bussiness/dpExceptionAppeal/appeal', {
				method: 'post',
				data: query,
			})
		},
		// 审批受理
		view_dpExceptionAppeal_receive(query) {
			return request('/bussiness/dpExceptionAppeal/receive', {
				method: 'post',
				data: query,
			})
		},
		view_dpExceptionAppeal_del(query) {
			return request('/bussiness/dpExceptionAppeal/del', {
				method: 'post',
				data: {
					batchesDel: query,
				},
			})
		},
		// 申诉处理情况统计
		view_dpExceptionAppeal_count(query = {}) {
			return request('/bussiness/dpExceptionAppeal/getCount', {
				method: 'post',
				data: query,
			})
		},
	}
}
// 数据变更数据
const dpDataChangeModel = (request) => {
	return {
		// 数据变更- 导出
		view_dpDataChange_export(query) {
			return request('/bussiness/dpDataChange/export', {
				method: 'post',
				data: query,
			})
		},
		// 数据变更
		view_dpDataChange_page(query) {
			return request('/bussiness/dpDataChange/page', {
				method: 'post',
				data: query,
			})
		},
		view_dpDataChange_add(query) {
			return request('/bussiness/dpDataChange/add', {
				method: 'post',
				data: query,
			})
		},
		view_dpDataChange_edit(query) {
			return request('/bussiness/dpDataChange/edit', {
				method: 'post',
				data: query,
			})
		},
		view_dpDataChange_del(query) {
			return request('/bussiness/dpDataChange/del', {
				method: 'post',
				data: {
					batchesDel: query,
				},
			})
		},
		// 数据变更内容
		view_dataChangeContent_page(query) {
			return request('/bussiness/dataChangeContent/page', {
				method: 'post',
				data: query,
			})
		},
		//数据变更情况统计
		view_dpDataChange_count(query = {}) {
			return request('/bussiness/dpDataChange/getCount', {
				method: 'post',
				data: query,
			})
		},
		//分页查询信息变更记录
		view_dpChangeRecord_page(query = {}) {
			return request('/bussiness/dpChangeRecord/page', {
				method: 'post',
				data: query,
			})
		},
		//采集数据统计
		view_statistics_gather(query = {}) {
			return request('/bussiness/statistics/gather/statistics', {
				method: 'post',
				data: query,
			})
		},
	}
}

// 居家养老从业人员基础数据
const dpFoundationPractitionersHomeMode = (request) => {
	return {
		//通过身份证号获取居家养老从业人员基础数据
		view_dpFoundationPractitionersHome_info(idCard) {
			return request(`/bussiness/dpFoundationPractitionersHome/info/${idCard}`, {
				method: 'get',
			})
		},
		// 分页查询居家养老从业人员基本信息统计
		view_dpFoundationPractitionersHome_pageCount(query) {
			return request('/bussiness/dpFoundationPractitionersHome/pageCount', {
				method: 'post',
				data: query,
			})
		},
		// 分页查询居家养老从业人员基本信息
		view_dpFoundationPractitionersHome_page(query) {
			return request('/bussiness/dpFoundationPractitionersHome/page', {
				method: 'post',
				data: query,
			})
		},
		// 居家养老从业人员基础数据采集
		view_dpFoundationPractitionersHome_gather(query) {
			return request('/bussiness/dpFoundationPractitionersHome/gather', {
				method: 'post',
				data: query,
			})
		},
		// 分页查询居家养老从业人员-删除
		view_dpFoundationPractitionersHome_del(query) {
			return request('/bussiness/dpFoundationPractitionersHome/del', {
				method: 'post',
				data: query,
			})
		},
		// 详情
		view_dpFoundationPractitionersHome_view(id) {
			return request(`/bussiness/dpFoundationPractitionersHome/${id}`, {
				method: 'get',
			})
		},
		// 导入
		view_dpFoundationPractitionersHome_import(query = {}, onUploadProgress) {
			return request('/bussiness/dpFoundationPractitionersHome/import', {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 导入模板下载
		view_dpFoundationPractitionersHome_downloadTemplate(query = {}) {
			return request('/bussiness/dpFoundationPractitionersHome/downloadTemplate', {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 居家养老从业人员基础信息导出
		view_dpFoundationPractitionersHome_exportAll(query) {
			return request('/bussiness/dpFoundationPractitionersHome/exportAll', {
				method: 'post',
				data: query,
			})
		},
		// 详情(通过身份证号查询)
		view_dpFoundationPractitioners_idCardQuery(idCard) {
			return request(`/bussiness/dpFoundationPractitionersHome/idCardQuery`, {
				method: 'post',
				data: {
					idCard,
				},
			})
		},
	}
}

export default ({ request }: any) => ({
	...serviceOrgModel(request),
	...baseModel(request),
	...dpExceptionAppealModel(request),
	...dpDataChangeModel(request),
	...dpFoundationPractitionersHomeMode(request),
})
